﻿#pragma once
#define DECLARE_PROPERTY(name,type,defaultValue) \
	type m_##name = (defaultValue);


#define PROPERTY_SETTER_IMP(name,val) \
	if(m_##name != (val)){\
		m_##name = (val);\
		emit name##Changed();\
	}

#define PROPERTY_GETTER_IMP(name) return m_##name;
#define ATTASSIST_IMP(name,val) PROPERTY_SETTER_IMP(name, val)


#include <QStringView>
QStringView const ME_MSG_KEY = u"command";
QStringView const ME_SIMSTATE = u"simState";
QStringView const ME_SIMUPDATE = u"simUpdate";
QStringView const ME_CONNECTSTATE = u"connectState";
QStringView const ME_TRANSMIT = u"transmit";
QStringView const ME_UPDATECAMERA = u"updateCamera";
QStringView const ME_UPDATERADAR = u"updateRadar";
QStringView const ME_UPDATEREGISTER = u"updateRegister";
QStringView const ME_SETWORKMODE = u"setWorkmode";
QStringView const ME_REPORTLOG = u"reportLog";
QStringView const ME_REQUEST_CONNECT_PARAM = u"requestReceiverParam";
QStringView const ME_LOCKEVENT = u"lockEvent";
QStringView const ME_UNLOCKEVENT = u"unlockEvent";
QStringView const ME_NETWORK_ERROR = u"network_error";